package org.aldar.bquest.profile;

import org.aldar.bquest.constants.LandscapeType;
import org.aldar.bquest.logic.controller.player.ManaAndPointsController;
import org.aldar.bquest.util.TestUtil;
import org.andengine.entity.Entity;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * User: Daria
 * Date: 2/3/14 9:59 PM
 */
public class LevelProfile {

    private int pointsAchieved = 0;

    private int turnsPerformed = 0;

    private List<Entity> concertsByTown = new LinkedList<Entity>();
    private Map<Integer, Integer> remainingConcertsByTown = new HashMap<Integer, Integer>();

    private int totalConcerts;

    private int performedConcerts;


    private LandscapeType lastStopLandscape = null;

    private int reachedTownIndex = -1;

    public int getTurnsPerformed() {
        return turnsPerformed;
    }

    public void setTurnsPerformed(int turnsPerformed) {
        this.turnsPerformed = turnsPerformed;
    }

    public LevelProfile() {
    }

    public void addAchievedPoints(int pointsToAdd, int multiplier, float startX, float startY) {
        pointsAchieved += pointsToAdd;
        TestUtil.getInstance().updateText("POINTS", "" + pointsAchieved);
        ManaAndPointsController.getInstance().addPoints(pointsToAdd, multiplier, startX, startY);
    }

    public void addTurn() {
        turnsPerformed++;
        TestUtil.getInstance().addTurn();
    }

    public List<Entity> getConcertsByTown() {
        return concertsByTown;
    }

    public LandscapeType getLastStopLandscape() {
        return lastStopLandscape;
    }

    public void setLastStopLandscape(LandscapeType lastStopLandscape) {
        this.lastStopLandscape = lastStopLandscape;
    }

    public int getReachedTownIndex() {
        return reachedTownIndex;
    }

    public void setReachedTownIndex(int reachedTownIndex) {
        this.reachedTownIndex = reachedTownIndex;
    }

    public Map<Integer, Integer> getRemainingConcertsByTown() {
        return remainingConcertsByTown;
    }

    public int getPointsAchieved() {
        return pointsAchieved;
    }

    public int getPerformedConcerts() {
        return performedConcerts;
    }

    public void setPerformedConcerts(int performedConcerts) {
        this.performedConcerts = performedConcerts;
    }

    public int getTotalConcerts() {
        return totalConcerts;
    }

    public void setTotalConcerts(int totalConcerts) {
        this.totalConcerts = totalConcerts;
    }

    public void addPerformedConcert() {
        this.performedConcerts += 1;
    }
}
